import React, { PureComponent } from 'react';
import style from "styled-components";

const store = require("store");

export default class OrderManagement extends PureComponent {
  constructor(props, context) {
    super(props, context);
    this.state = {
      // currentURL: "http://localhost:3000/#/center?switchArea=order",
    };
  }
  componentDidMount = () => {
    //sessionId
    console.log('百课堂＝＝store.get("saas")["sessionId"]', store.get("saas")["sessionId"]);
  }
  render() {
    return (
      <Container>
        {store.get("orderManagementURL") !== undefined ? (
          <iframe title="订单管理" src={store.get("orderManagementURL")["orderManagementURL"] + '&sessionId=' + store.get("saas")["sessionId"]} width="100%" height="100%" frameBorder="0">
            您的浏览器不支持iframe，请升级
          </iframe>
        ) : ''
        }
        {/*{store.get("saas") !== undefined ? (
          <iframe title="订单管理" src={this.state.currentURL + '&sessionId=' + store.get("saas")["sessionId"] + '&username=' + store.get("user")["username"] + '&password=' + store.get("user")["password"]} width="100%" height="100%" frameBorder="0">
            您的浏览器不支持iframe，请升级
          </iframe>
        ) : ''
        }
        {/* {store.get("saas") !== undefined ? (
          <iframe title="订单管理" src='"+"http://localhost:3000/center?switchArea=order&sessionId="+store.get("saas")["sessionId"]+"' width="100%" height="100%" frameBorder="0">
            您的浏览器不支持iframe，请升级
          </iframe>
        ) : ''
        } */}
      </Container >
    );
  }
}

const Container = style.div`
  padding:24px;
  width:100%;
  height:100%;
`;
